package com.cyt.work.association.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 社团招新管理-报名记录数据实体类
 *
 * @author ding xu
 * @date 2019-9-17
 */

@Data
@NoArgsConstructor
@Table(name = "cyt_wx_association_sign")
public class WxAssociationSign implements Serializable {

    /**
     * 主键
     */
    @Id
    private String id;

    /**
     * 模块ID
     */
    @Column(name = "apply_id")
    private String applyId;

    /**
     * 社团招新id
     */
    @Column(name = "association_new_id")
    private String associationNewId;

    @Column(name = "association_detail_id")
    private String associationDetailId;

    /**
     * 社团id
     */
    @Column(name = "association_id")
    private String associationId;

    /**
     * 社团用户ID
     */
    @Column(name = "association_user_id")
    private String associationUserId;

    /**
     * 社团报名时间
     */
    @Column(name = "sign_time")
    private Date signTime;

    /**
     * 社团报名状态：1-已报名；2-已结束
     */
    @Column(name = "status")
    private String status;

    /**
     * 姓名
     */
    @Column(name = "user_name")
    private String userName;

    /**
     * 学号
     */
    @Column(name = "user_number")
    private String userNumber;

    /**
     * 是否删除：1-未删除；2-已删除
     */
    @Column(name = "remove_tag")
    private String removeTag;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 创建人
     */
    @Column(name = "create_user")
    private String createUser;

    /**
     * 更新人
     */
    @Column(name = "update_user")
    private String updateUser;

    /**
     * 创建对象
     *
     * @param sysUser 当前用户信息
     * @author han jun
     * @date 2019-8-30 16:17:54
     */
    public WxAssociationSign(SysUser sysUser) {
        this.id = BaseUtil.uId();
        this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
        this.createTime = new Date();
        this.createUser = sysUser.getId();
        this.updateTime = new Date();
        this.updateUser = sysUser.getId();
    }

}
